home *** CD-ROM | disk | FTP | other *** search
- program SPELLCH2;
- {checks the SPELLER.LIS or a aux dictionary file for out of place words.}
- var
- filecheck : text;
- FBuf : array[0..$1fff] of char;
- word, oldword : string [24];
- wordcount : integer;
- begin
- if ParamCount = 0 then word := 'SPELLER.LIS'
- else word := ParamStr(1);
- assign (filecheck, Word);
- SetTextBuf (FileCheck, FBuf);
- reset (filecheck);
- writeln ('CHECKING ', Word);
- word := '';
- oldword := '';
- readln (filecheck, word);
- wordcount := 1;
- while not eof (filecheck) do begin
- oldword := word;
- readln (filecheck, word);
- wordcount := wordcount+1;
- if not (word > oldword) then writeln (oldword, ' ', word);
- end;
- close (filecheck);
- writeln ('Dictionary contains ', wordcount, ' words.');
- end.
-